package org.ly817.busCode.core;

/**
 * Created by LuoYu on 2019/2/26.
 */
class Table {
    private Long secondWaterId;
    private double elecSum;
    private double voltageA;
    private double voltageB;
    private double voltageC;
    private double electricCurrentA;
    private double electricCurrentB;
    private double electricCurrentC;
    private double powerFactor;
    private String electricPower;
    private String waterPumpSts;
    private String pumpPowerSts;
    private String waterResetSts;
    private String setWaterGage;
    private double getWaterGage;
    private String tapMasterSts;
    private String tap1Sts;
    private String tap2Sts;
    private String tap3Sts;
    private String tap4Sts;
    private String tap5Sts;
    private String sts;
    private String stsDate;
    private String tap6Sts;
    private String tap7Sts;
    private String tap8Sts;
    private double flowmetreSpeed;
    private double flowmetreSum;
    private double electricityMetterCp;
    private String errorCode;

    public Long getSecondWaterId() {
        return secondWaterId;
    }

    public void setSecondWaterId(Long secondWaterId) {
        this.secondWaterId = secondWaterId;
    }

    public double getElecSum() {
        return elecSum;
    }

    public void setElecSum(double elecSum) {
        this.elecSum = elecSum;
    }

    public double getVoltageA() {
        return voltageA;
    }

    public void setVoltageA(double voltageA) {
        this.voltageA = voltageA;
    }

    public double getVoltageB() {
        return voltageB;
    }

    public void setVoltageB(double voltageB) {
        this.voltageB = voltageB;
    }

    public double getVoltageC() {
        return voltageC;
    }

    public void setVoltageC(double voltageC) {
        this.voltageC = voltageC;
    }

    public double getElectricCurrentA() {
        return electricCurrentA;
    }

    public void setElectricCurrentA(double electricCurrentA) {
        this.electricCurrentA = electricCurrentA;
    }

    public double getElectricCurrentB() {
        return electricCurrentB;
    }

    public void setElectricCurrentB(double electricCurrentB) {
        this.electricCurrentB = electricCurrentB;
    }

    public double getElectricCurrentC() {
        return electricCurrentC;
    }

    public void setElectricCurrentC(double electricCurrentC) {
        this.electricCurrentC = electricCurrentC;
    }

    public double getPowerFactor() {
        return powerFactor;
    }

    public void setPowerFactor(double powerFactor) {
        this.powerFactor = powerFactor;
    }

    public String getElectricPower() {
        return electricPower;
    }

    public void setElectricPower(String electricPower) {
        this.electricPower = electricPower;
    }

    public String getWaterPumpSts() {
        return waterPumpSts;
    }

    public void setWaterPumpSts(String waterPumpSts) {
        this.waterPumpSts = waterPumpSts;
    }

    public String getPumpPowerSts() {
        return pumpPowerSts;
    }

    public void setPumpPowerSts(String pumpPowerSts) {
        this.pumpPowerSts = pumpPowerSts;
    }

    public String getWaterResetSts() {
        return waterResetSts;
    }

    public void setWaterResetSts(String waterResetSts) {
        this.waterResetSts = waterResetSts;
    }

    public String getSetWaterGage() {
        return setWaterGage;
    }

    public void setSetWaterGage(String setWaterGage) {
        this.setWaterGage = setWaterGage;
    }

    public double getGetWaterGage() {
        return getWaterGage;
    }

    public void setGetWaterGage(double getWaterGage) {
        this.getWaterGage = getWaterGage;
    }

    public String getTapMasterSts() {
        return tapMasterSts;
    }

    public void setTapMasterSts(String tapMasterSts) {
        this.tapMasterSts = tapMasterSts;
    }

    public String getTap1Sts() {
        return tap1Sts;
    }

    public void setTap1Sts(String tap1Sts) {
        this.tap1Sts = tap1Sts;
    }

    public String getTap2Sts() {
        return tap2Sts;
    }

    public void setTap2Sts(String tap2Sts) {
        this.tap2Sts = tap2Sts;
    }

    public String getTap3Sts() {
        return tap3Sts;
    }

    public void setTap3Sts(String tap3Sts) {
        this.tap3Sts = tap3Sts;
    }

    public String getTap4Sts() {
        return tap4Sts;
    }

    public void setTap4Sts(String tap4Sts) {
        this.tap4Sts = tap4Sts;
    }

    public String getTap5Sts() {
        return tap5Sts;
    }

    public void setTap5Sts(String tap5Sts) {
        this.tap5Sts = tap5Sts;
    }

    public String getSts() {
        return sts;
    }

    public void setSts(String sts) {
        this.sts = sts;
    }

    public String getStsDate() {
        return stsDate;
    }

    public void setStsDate(String stsDate) {
        this.stsDate = stsDate;
    }

    public String getTap6Sts() {
        return tap6Sts;
    }

    public void setTap6Sts(String tap6Sts) {
        this.tap6Sts = tap6Sts;
    }

    public String getTap7Sts() {
        return tap7Sts;
    }

    public void setTap7Sts(String tap7Sts) {
        this.tap7Sts = tap7Sts;
    }

    public String getTap8Sts() {
        return tap8Sts;
    }

    public void setTap8Sts(String tap8Sts) {
        this.tap8Sts = tap8Sts;
    }

    public double getFlowmetreSpeed() {
        return flowmetreSpeed;
    }

    public void setFlowmetreSpeed(double flowmetreSpeed) {
        this.flowmetreSpeed = flowmetreSpeed;
    }

    public double getFlowmetreSum() {
        return flowmetreSum;
    }

    public void setFlowmetreSum(double flowmetreSum) {
        this.flowmetreSum = flowmetreSum;
    }

    public double getElectricityMetterCp() {
        return electricityMetterCp;
    }

    public void setElectricityMetterCp(double electricityMetterCp) {
        this.electricityMetterCp = electricityMetterCp;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getInsertSql() {
        String template = "INSERT INTO \"NBIOT_TEST\".\"SECOND_WATER_INFO\" VALUES ('%secondWaterId', '%elecSum', '%voltageA', '%voltageB', '%voltageC', " +
                "'%electricCurrentA', '0', '0', '1', '0', '0', '0', null, '0.01', '1', '1', '1', null, null, null, 'A', TO_DATE('%stsDate', 'YYYY-MM-DD HH24:MI:SS'), null, null, null, '0', '3.14', '0', '0', '0');";
        template = template.replaceAll("%secondWaterId", this.secondWaterId + "")
                .replaceAll("%elecSum", elecSum + "")
                .replaceAll("%voltageA", voltageA + "")
                .replaceAll("%voltageB", voltageB + "")
                .replaceAll("%voltageC", voltageC + "")
                .replaceAll("%electricCurrentA", electricCurrentA + "")
                .replaceAll("%electricCurrentB", electricCurrentB + "")
                .replaceAll("%electricCurrentC", electricCurrentC + "")
                .replaceAll("%stsDate", stsDate + "");
        return template + "\n";
    }
}
